package com.zking.advice;

import com.zking.dto.common.ResultDto;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class ExceptionControllerAdvice {
    @ExceptionHandler({Exception.class})
    public ResultDto<String> handler(Exception e) {
        return ResultDto.fail(500, e.getMessage());
    }
}
